<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}/" />
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ext-strict">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="${ctx}static/thirdparty/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<link href="${ctx}static/thirdparty/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
	<!--[if IE 7]>
	<link href="${ctx}static/thirdparty/font-awesome/css/font-awesome-ie7.min.css" type="text/css" rel="stylesheet" />
	<![endif]-->
	<link type="text/css" href="${ctx}static/thirdparty/jquery/noty/css/jquery.noty.css" rel="stylesheet" />
	<link type="text/css" href="${ctx}static/thirdparty/jquery/noty/css/noty_theme_twitter.css" rel="stylesheet" />
	<!-- artdialog simple skin -->
	<link type="text/css" href="${ctx}static/thirdparty/artdialog/skins/blue.css" rel="stylesheet" />
	<link type="text/css" href="${ctx}static/thirdparty/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
	<!-- pagination -->
	<link href="${ctx}static/style/pagination.css" type="text/css" rel="stylesheet" />
	<link type="text/css" href="${ctx}static/css/style.css" rel="stylesheet" />
	<style>
		.alert-center{position:absolute;left:40%;top:50%;}
	</style>
	<%-- 添加圆角 --%>
	<!--[if IE]>
	<style>
	.badge{
		behavior: url(<%=request.getContextPath()%>/static/thirdparty/pie/PIE.htc);
	}
	</style>
	<![endif]-->
	<script>
		var contextPath = "${ctx}";
	</script>	
	<script src="${ctx}static/thirdparty/jquery/jquery-1.8.0.min.js" type="text/javascript"></script>
	<script src="${ctx}static/thirdparty/bootstrap/js/bootstrap.min.js?${VERSION}" type="text/javascript"></script>
	<script src="${ctx}static/thirdparty/artdialog/jquery.artDialog.js?${VERSION}" type="text/javascript"></script>
	<script src="${ctx}static/thirdparty/artdialog/plugins/iframeTools.js" type="text/javascript"></script>	
	<script src="${ctx}static/script/jquery.my.js?${VERSION}" type="text/javascript"></script>
	<script src="${ctx}static/script/message.js?${VERSION}" type="text/javascript"></script>
	<script src="${ctx}static/thirdparty/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
	<script src="${ctx}static/thirdparty/bootstrap-datetimepicker/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>	
	<script>
		jQuery(function(){
			jQuery(".btn").removeAttr("disabled");
		});	
		function clearCache(obj) {
			var $this = jQuery(obj);
			$this.attr("disabled","disabled");
			var objId = $this.attr('id');
			var name = $this.html();
			jQuery.ajax({
				type:'get',
				url: contextPath + "clear/"+objId+"/cache",	
				async:false,
				dataType:'json',
				success:function(){
					Message.success(name+"成功！", 2);
				},
				error:function(XMLHttpRequest,textStatus,errorThrown){
					Message.success(name+"失败！", 2);	
				}
		}).done(function(){
			$this.removeAttr("disabled");
		});
		}
	</script>
</head>
<body style="margin-top:15px;margin-left:5px;">
	<!-- <button id="user" type="button" class="btn" onclick="clearCache(this);">清空用户缓存</button> -->
	<button id="config" type="button" class="btn" onclick="clearCache(this);">清空全局设置缓存</button>
	<button id="app" type="button" class="btn" onclick="clearCache(this);">清空App缓存</button>
	<button id="resource" type="button" class="btn" onclick="clearCache(this);">清空图片资源缓存</button>
	<button id="like" type="button" class="btn" onclick="clearCache(this);">清空赞/收藏缓存</button>
	<!-- <button id="all" type="button" class="btn" onclick="clearCache(this);">清空全部缓存</button> -->
</body>
</html>